package de.dlrg.wms.controller.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import de.dlrg.wms.controller.interfaces.ICRUD;
import de.dlrg.wms.dao.DisciplineDao;
import de.dlrg.wms.model.Discipline;

@Component
public class DisciplineController implements ICRUD<Discipline>{
	@Autowired
	private DisciplineDao disciplineDao;
	

	public List<Discipline> readAll() {
		return this.disciplineDao.readAll();
	}
	
	public void createOrUpdate(Discipline toCreateOrUpdate) {
		this.validate(toCreateOrUpdate);
		this.disciplineDao.save(toCreateOrUpdate);
	}

	public void delete(Discipline toDelete) {
		this.disciplineDao.delete(toDelete);
	}

	public void validate(Discipline toValidate) {
		// TODO Auto-generated method stub
		
	}

}
